package com.example.zz;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.URL;

import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

public class MainActivity extends Activity {
	 TextView te;StringBuilder v;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);

		// Edit Text
		te=(TextView)findViewById(R.id.textView1);
		// Create button
		Button btnCreateProduct1 = (Button) findViewById(R.id.button1);
		// button click event
		btnCreateProduct1.setOnClickListener(new View.OnClickListener() {
			@Override
			public void onClick(View view) {
				//dd aa=new dd();
				//aa.start();
				Runnable tt=new Runnable() {
					
					@Override
					public void run() {
						try {
							new App();
						} catch (MalformedURLException e) {
							// TODO Auto-generated catch block
							e.printStackTrace();
						} catch (IOException e) {
							// TODO Auto-generated catch block
							e.printStackTrace();
						}
						
					}
				};
				Thread aaa=new Thread(tt);
				aaa.start();
				try{
					Thread.sleep(8000);
					
				}
				catch(Exception a){}
			}
			
		});
		
	}
	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}

}
